<template>
	<!-- 简历详情 -->
	<view class="box">
		<!-- #ifdef MP-WEIXIN -->
		<view class="head" :style="'padding-top:'+statusBarHeight1+'px;padding-right:'+ (WXwidth + 15) +'px;height:' + (statusBarHeight1 + 44) + 'px'">
		<!-- #endif -->
		<!-- #ifndef MP-WEIXIN -->
		<view class="head" :style="'padding-top:'+(statusBarHeight1+10)+'px;height:' + (statusBarHeight1 + 54) + 'px'">
		<!-- #endif -->
			<view class="ve_image">
				<image class="fanhui" @click="fanhui" src="https://pic.bangbangtongcheng.com/static/fanhui_bai.png" mode=""></image>
			</view>
			<view class="centers">
				个人作品
			</view>
			<view class="head_right"></view>
		</view>
		<!-- #ifdef MP-WEIXIN -->
		<view :style="'padding-top:'+statusBarHeight1+'px;height:' + (statusBarHeight1 + 44) + 'px;background-color: #64B6A8;'"></view>
		<!-- #endif -->
		<!-- #ifndef MP-WEIXIN -->
		<view :style="'padding-top:'+statusBarHeight1+'px;height:' + (statusBarHeight1 + 54) + 'px;background-color: #64B6A8;'"></view>
		<!-- #endif -->
		<view class="center">
			<image class="image" :src="i" v-for="(i,j) in grzp_Data" @click="HJViewImage(i)" :key="j" mode="aspectFill"></image>
		</view>
		<uniBall></uniBall>
	</view>
</template>

<script>
	import permision from "@/js_sdk/wa-permission/permission.js"
	import {
		mapGetters
	} from "vuex";
	let statusBarHeight;
	//#ifdef H5
	import wxshare from "../../utils/index.js";
	statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 10 + 44;
	//#endif
	// #ifdef APP-PLUS
	statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 10 + 44;
	//  #endif
	// #ifdef MP-WEIXIN
	statusBarHeight = 106;
	//  #endif
	export default {
		data() {
			return {
				userInfo: uni.getStorageSync("Pduser"),
				statusBarHeight,
				WXwidth:'',
				grzp_Data:[]
			};
		},

		computed: {
			...mapGetters(["statusBarHeight1", "userinfo"]),
		},
		async onLoad(option) {
			// #ifdef MP-WEIXIN
			// 获取胶囊信息
			let menuButtonInfo = uni.getMenuButtonBoundingClientRect()
			let getWindowInfo = uni.getWindowInfo().screenWidth
			this.WXwidth=getWindowInfo - (menuButtonInfo.right - menuButtonInfo.width)
			// #endif
			this.grzp_Data = uni.getStorageSync('grzpImg_key');
			uni.removeStorageSync('grzpImg_key');
			/* #ifdef H5 */
			this.jinzhi();
			/* #endif */
		},
		methods: {
			HJViewImage(urls) {
				uni.previewImage({
					urls:this.grzp_Data ,
					current: urls,
				});
			},
			jinzhi() {
				let _this = this;
				let param = window.location.href.split("#")[0];
				uni.request({
					method: "post",
					data: {
						url: param
					},
					header: {
						"content-type": "application/x-www-form-urlencoded",
					},
					url: "https://www.bangbangtongcheng.com/conven//mob/login/getJsTicket.do",
					success(re) {
						_this.jinzhifx(re.data);
					},
				});
			},
			jinzhifx(data) {
				wxshare.config({
					debug: false, //是否打开调试
					appId: data.appId, // 公众号的唯一标识
					timestamp: data.timestamp, // 生成签名的时间戳
					nonceStr: data.nonce, // ，生成签名的随机串
					signature: data.signature, // 签名
					jsApiList: ["hideMenuItems"],
				});
				// 禁止分享
				wxshare.hideMenuItems({
					// 要隐藏的菜单项，只能隐藏“传播类”和“保护类”按钮，所有menu项见附录3
					menuList: [
						"menuItem:share:appMessage",
						"menuItem:share:timeline",
						"menuItem:share:timeline",
						"menuItem:share:qq",
						"menuItem:favorite",
						"menuItem:share:QZone",
						"menuItem:openWithSafari",
					],
				});
			},
			fanhui() {
				uni.navigateBack({
					delta: 1
				});
			},
		},
	};
</script>

<style lang="less" scoped>
	.box {
		width: 100%;
		min-height: 100vh;
		padding-bottom: 130rpx;
		background-color: #fff;
	}
	.head {
		position: fixed;
		top: 0;
		left: 0;
		width: 750rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 0 15px;
		background-color: #64B6A8;
		z-index: 1000;
		.ve_image{
			width: 150rpx;
			display: flex;
			align-items: center;
			.fanhui {
				width: 40rpx;
				height: 40rpx;
			}
		}
	
		.centers {
			font-size: 36rpx;
			font-weight: 400;
			color: #FFFFFF;
		}
	
		.head_right {
			width: 150rpx;
			font-size: 30rpx;
			font-weight: 400;
			color: #FFFFFF;
			display: flex;
			align-items: center;
		}
	}
	.center{
		width: 690rpx;
		margin:0 auto;
		padding-top: 20rpx;
		.image{
			width: 100%;
			height: 360rpx;
			border-radius: 10rpx;
			margin-bottom: 20rpx;
		}
	}
</style>